package com.mo.axion.handler.flowcontrol;

import com.google.common.util.concurrent.RateLimiter;
import com.mo.axion.common.enums.RateLimitStrategy;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Mo
 * @createTime 2024/4/12 12:15
 * @description 流量控制所需要的参数
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FlowControlParam {
    /**
     * 限流器
     * 子类初始化时指定
     */
    protected RateLimiter rateLimiter;

    /**
     * 限流器初始限流大小
     */
    protected Double rateInitValue;

    /**
     * 限流策略
     * 子类初始化时指定
     */
    protected RateLimitStrategy rateLimitStrategy;

}
